package com.guoxianwei.scm.domain;

import java.io.Serializable;

public class MenuItem implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7495574672888931708L;

	private int itemid;
	private int menuid;
	private String menuno;
	private String itemno;
	private String itemname;
	private String itemicon;
	private Menu menu;

	public int getItemid() {
		return itemid;
	}

	public void setItemid(int itemid) {
		this.itemid = itemid;
	}

	public int getMenuid() {
		return menuid;
	}

	public void setMenuid(int menuid) {
		this.menuid = menuid;
	}

	public String getMenuno() {
		return menuno;
	}

	public void setMenuno(String menuno) {
		this.menuno = menuno;
	}

	public String getItemno() {
		return itemno;
	}

	public void setItemno(String itemno) {
		this.itemno = itemno;
	}

	public String getItemname() {
		return itemname;
	}

	public void setItemname(String itemname) {
		this.itemname = itemname;
	}

	public String getItemicon() {
		return itemicon;
	}

	public void setItemicon(String itemicon) {
		this.itemicon = itemicon;
	}

	public Menu getMenu() {
		return menu;
	}

	public void setMenu(Menu menu) {
		this.menu = menu;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + itemid;
		result = prime * result
				+ ((itemname == null) ? 0 : itemname.hashCode());
		result = prime * result + ((itemno == null) ? 0 : itemno.hashCode());
		result = prime * result + menuid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof MenuItem))
			return false;
		MenuItem other = (MenuItem) obj;
		if (itemid != other.itemid)
			return false;
		if (itemname == null) {
			if (other.itemname != null)
				return false;
		} else if (!itemname.equals(other.itemname))
			return false;
		if (itemno == null) {
			if (other.itemno != null)
				return false;
		} else if (!itemno.equals(other.itemno))
			return false;
		if (menuid != other.menuid)
			return false;
		return true;
	}
}
